﻿function genAd1(){
google_ad_client = "pub-6150392874922866";
google_ad_slot = "0829674195";
google_ad_width = 728;
google_ad_height = 90;
document.write('<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></s'+'cript>');
}
function genAd2(){
google_ad_client = "pub-6150392874922866";
google_ad_slot = "0167703002";
google_ad_width = 160;
google_ad_height = 600;
document.write('<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></s'+'cript>');
}
function genAd3(){
//if(document.getElementById("aliAd")) document.getElementById("aliAd").style.marginTop = "610px";
}
function createFrame(id){
var iNode = document.createElement("IFRAME");
iNode.setAttribute("id", id);
iNode.setAttribute("frameborder", "0");
iNode.style.position = "absolute";
iNode.style.display = "none";
document.body.appendChild(iNode);
return iNode;
}
function loadFrame(id, url){
var frameRef = document.getElementById(id);
if(!frameRef)
	frameRef = createFrame(id);
frameRef.src = url;
}
function removeFrame(id){
var frameRef = document.getElementById(id);
if(frameRef)
	document.body.removeChild(frameRef);
}
function getInner(str,pre,suf){
var begin=str.indexOf(pre);
if(begin<0)return "";
var tmp=str.substring(begin+pre.length, str.length-1);
var end=tmp.indexOf(suf);
if(end<0)return "";
return tmp.substring(0,end);
}
function sclicktb(obj){
try{
var p=obj.parentNode;
var count=0;
while("LI"!=p.tagName && count < 5){
    p=p.parentNode;
    count=count+1;
}
var u=getInner(p.innerHTML,"ww:params=\"nick=", "&");
if(u && u!=""){
u="http://www.vivimm.cn/sclicktaobao.aspx?nick="+escape(u);
removeFrame("sclicktb");
loadFrame("sclicktb", u);
}
}catch(e){}
return true;
}

try{
HTMLElement.prototype.__defineGetter__("innerText",function ()
{
var anyString = "";
var childS = this.childNodes;
for(var i=0; i<childS.length; i++)
{
if(childS[i].nodeType==1)
anyString += childS[i].tagName=="BR" ? '"n' : childS[i].innerText;
else if(childS[i].nodeType==3)
anyString += childS[i].nodeValue;
}
return anyString;
}
);
}
catch(e){}

